﻿using System;
using System.Collections.Generic;
using System.Linq;
using OpenWaves.Web.Pagination;

namespace OpenWaves.Web.Tests
{
    public partial class GetBasedPagination : System.Web.UI.Page
    {
        private readonly IEnumerable<int> items = Enumerable.Range(0, 100);

        protected PaginationViewModel<int> Model;
        protected PaginationController PaginationController;

        protected override void OnDataBinding(EventArgs e)
        {
            this.PaginationController = new PaginationController(this.Request);

            this.Model = this.PaginationController.Paginate(this.items);
            
            base.OnDataBinding(e);
        }
    }


}